// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.PurchaseOrder;
import com.fowo.api.model.purchase.order.PurchaseOrderItemVo;
import com.fowo.api.model.purchase.order.PurchaseOrderSearchParamPo;
import com.fowo.api.model.purchase.order.PurchaseOrderVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PurchaseOrderMapper extends BaseMapper<PurchaseOrder> {
  Page<PurchaseOrderItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") PurchaseOrderSearchParamPo search
  );
  List<OptionItem<PurchaseOrderItemVo>> searchOptions(
    @Param("search") PurchaseOrderSearchParamPo search
  );
  List<PurchaseOrderItemVo> search(
    @Param("search") PurchaseOrderSearchParamPo search
  );
  Date searchLastUpdateTime(@Param("search") PurchaseOrderSearchParamPo search);
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") PurchaseOrderSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") PurchaseOrderSearchParamPo search);
  Long getIdByPurchaseOrderCode(
    @Param("purchaseOrderCode") String purchaseOrderCode
  );

  List<Long> getIdsByPurchaseOrderCode(@Param("list") List<String> list);

  String getPurchaseOrderCodeById(@Param("id") Long id);

  List<Map<String, Object>> getPurchaseOrderCodeByIds(
    @Param("ids") List<Long> ids
  );
  PurchaseOrderVo selectVoById(@Param("id") Long id);
  /** 更新指定对象的所有计算字段值 */
  int updateCalcFields(Long id);
  /**
   * 全部
   */
  List<PurchaseOrderItemVo> complete(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取全部编号列表
   */
  List<Long> completeIds(@Param("search") PurchaseOrderSearchParamPo search);

  /**
   * 获取全部的总数
   */
  Long completeCount(@Param("search") PurchaseOrderSearchParamPo search);

  /**
   * 全部分页
   */
  Page<PurchaseOrderItemVo> completePage(
    @Param("page") Page page,
    @Param("search") PurchaseOrderSearchParamPo search
  );
  Date completeLastUpdateTime(
    @Param("search") PurchaseOrderSearchParamPo search
  );
  /**
   * 待提交
   */
  List<PurchaseOrderItemVo> changesToBeCommitted(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取待提交编号列表
   */
  List<Long> changesToBeCommittedIds(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取待提交的总数
   */
  Long changesToBeCommittedCount(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 待提交分页
   */
  Page<PurchaseOrderItemVo> changesToBeCommittedPage(
    @Param("page") Page page,
    @Param("search") PurchaseOrderSearchParamPo search
  );
  Date changesToBeCommittedLastUpdateTime(
    @Param("search") PurchaseOrderSearchParamPo search
  );
  /**
   * 待审批
   */
  List<PurchaseOrderItemVo> theApprovalIsPending(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取待审批编号列表
   */
  List<Long> theApprovalIsPendingIds(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取待审批的总数
   */
  Long theApprovalIsPendingCount(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 待审批分页
   */
  Page<PurchaseOrderItemVo> theApprovalIsPendingPage(
    @Param("page") Page page,
    @Param("search") PurchaseOrderSearchParamPo search
  );
  Date theApprovalIsPendingLastUpdateTime(
    @Param("search") PurchaseOrderSearchParamPo search
  );
  /**
   * 待下单
   */
  List<PurchaseOrderItemVo> stagingReleaseOrderParts(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取待下单编号列表
   */
  List<Long> stagingReleaseOrderPartsIds(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取待下单的总数
   */
  Long stagingReleaseOrderPartsCount(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 待下单分页
   */
  Page<PurchaseOrderItemVo> stagingReleaseOrderPartsPage(
    @Param("page") Page page,
    @Param("search") PurchaseOrderSearchParamPo search
  );
  Date stagingReleaseOrderPartsLastUpdateTime(
    @Param("search") PurchaseOrderSearchParamPo search
  );
  /**
   * 待到货
   */
  List<PurchaseOrderItemVo> awaitingArrival(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取待到货编号列表
   */
  List<Long> awaitingArrivalIds(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取待到货的总数
   */
  Long awaitingArrivalCount(@Param("search") PurchaseOrderSearchParamPo search);

  /**
   * 待到货分页
   */
  Page<PurchaseOrderItemVo> awaitingArrivalPage(
    @Param("page") Page page,
    @Param("search") PurchaseOrderSearchParamPo search
  );
  Date awaitingArrivalLastUpdateTime(
    @Param("search") PurchaseOrderSearchParamPo search
  );
  /**
   * 已完成
   */
  List<PurchaseOrderItemVo> completed(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取已完成编号列表
   */
  List<Long> completedIds(@Param("search") PurchaseOrderSearchParamPo search);

  /**
   * 获取已完成的总数
   */
  Long completedCount(@Param("search") PurchaseOrderSearchParamPo search);

  /**
   * 已完成分页
   */
  Page<PurchaseOrderItemVo> completedPage(
    @Param("page") Page page,
    @Param("search") PurchaseOrderSearchParamPo search
  );
  Date completedLastUpdateTime(
    @Param("search") PurchaseOrderSearchParamPo search
  );
  /**
   * 已作废
   */
  List<PurchaseOrderItemVo> haveBeenVoided(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取已作废编号列表
   */
  List<Long> haveBeenVoidedIds(
    @Param("search") PurchaseOrderSearchParamPo search
  );

  /**
   * 获取已作废的总数
   */
  Long haveBeenVoidedCount(@Param("search") PurchaseOrderSearchParamPo search);

  /**
   * 已作废分页
   */
  Page<PurchaseOrderItemVo> haveBeenVoidedPage(
    @Param("page") Page page,
    @Param("search") PurchaseOrderSearchParamPo search
  );
  Date haveBeenVoidedLastUpdateTime(
    @Param("search") PurchaseOrderSearchParamPo search
  );
}
